import axios from '@/api/request/request'

// 获取列表
const getMenuTreeList = (option: any) => {
  return axios.post('/auth/sysMenuMobile/getMenuTreeList', {
    ...option
  })
}

// 添加
const addMenu = (option: any) => {
  return axios.post('/auth/sysMenuMobile/addMenu', {
    ...option
  })
}

// 更新节点
const updateMenu = (option: any) => {
  return axios.post('/auth/sysMenuMobile/updateMenu', {
    ...option
  })
}

// 删除节点
const deleteMenu = (option: any) => {
  return axios.post('/auth/sysMenuMobile/deleteMenu', {
    ...option
  })
}

// 小程序排序
const batchUpdateMiniMenu = (option: any) => {
  return axios.post('/auth/sysMenuMobile/batchUpdateMenu', option)
}

export { getMenuTreeList, addMenu, updateMenu, deleteMenu, batchUpdateMiniMenu }
